home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 9
/
009.d81
/
alarm clock
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
210 lines
0 poke53281,1:poke53280,1:print"[147][157]";
5 aa$=" ":printchr$(8)
10 fora=1to15:print"[194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
20 fora=1to15:print"[194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
30 fora=1to15:print"[194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
40 fora=1to15:print"[194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
50 fora=1to15:print"[194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
60 fora=1to15:print"[194] [194] [194] [194] [194] [199] [199] [199] [194] [194] [194] [194] [194] [194] [199]":next
63 fora=1to15:print"[194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
65 fora=1to15:print" press any key to begin the program ":next
67 fora=1to15:print" [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] ":next
70 fora=1to15:print"[199] [199] [199] [194] [194] [199] [199] [199] [199] [199]":next
75 fora=1to15:print"[199] [199] [194] [199] [199] [199]":next
77 fora=1to15:print"[194] [194] [194] [194] [194] [199] [199] [199] [199] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
80 getx$:ifx$=""then60
85 fora=1to15:print"[194] [194] [194] [194] [194]one moment please[194] [194] [194] [194] [194] [194] [199]":next
90 fora=1to15:print"[199] [199] [199] [194] [194] [199] [199] [199] [199] [199]":next
91 pm$="[209][209][209][209] [209] [209]"
92 pm$=pm$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209] [209] [209][209] [209][209]"
93 pm$=pm$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209][209][209][209] [209] [209] [209] [209]"
94 pm$=pm$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209] [209] [209] [209] [209]"
95 pm$=pm$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209] [209] [209] [209]"
96 am$="[209][209][209][209] [209] [160][209]"
97 am$=am$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209] [209] [209][209] [209][209]"
98 am$=am$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209][209][209][209] [209] [209] [209] [209]"
99 am$=am$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209] [209] [209] [209] [209] [209]"
100 am$=am$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][209] [209] [209] [209] [209]"
125 fora=1to25:print"[199] [199] [199] [194] [194] one moment please [199] [199] [199] [199] [199]":next
126 fora=1to25:print"[194] [194] [194] [194] [194] [199] [199] [199] [199] [194] [194] [194] [194] [194] [194] [194] [194] [194] [194] [199]":next
127 ifval(ti$)<010000then160
128 ifval(ti$)=>130000then160
129 print"register reads- ";ti$
130 print"is this correct, user?"
140 getx$:ifx$=""then129
150 ifx$<>"n"then500
160 print"[147]type correct value (12-hour format)"
165 print" 010000-125959 (hhmmss 6 digits)":input a1$:goto172
170 goto165
172 a1$=left$(a1$,6)
173 ifval(a1$)<010000then170
195 ifval(a1$)>125959then170
210 ti$=a1$
300 print"";ti$
305 gosub 30000
310 a3=a3+1:ifa3>200then85
320 goto300
500 gosub507
505 goto2015
507 xc$="[157][157][157][157][157][157][157][157]"
510 k$(0)=xc$:for ii=1to8:k$(0)=k$(0)+aa$:next:aa$=aa$+"[146]"
520 k$(1)=xc$+aa$+"[146] "+aa$+"[146]"
530 k$(2)=xc$+"[146] "+aa$+"[146]"
540 k$(3)=xc$+"[146]"+aa$+" "
550 k$(4)=xc$+"[146] "
610 k$(5)=right$(k$(0),16)
620 k$(6)=right$(k$(1),14)
630 k$(7)=right$(k$(2),12)
640 k$(8)=right$(k$(3),11)
650 k$(9)=right$(k$(4),9)
1000 a$(0)=k$(5)+k$(1)+k$(1)+k$(1)+k$(1)+k$(1)+k$(1)
1010 a$(0)=a$(0)+k$(1)+k$(1)+k$(0)
1020 a$(1)=k$(7)+k$(2)+k$(2)+k$(2)+k$(2)+k$(2)+k$(2)
1030 a$(1)=a$(1)+k$(2)+k$(2)+k$(2)
1040 a$(2)=k$(5)+k$(2)+k$(2)+k$(2)+k$(0)+k$(3)+k$(3)
1050 a$(2)=a$(2)+k$(3)+k$(3)+k$(0)
1060 a$(3)=k$(5)+k$(2)+k$(2)+k$(2)+k$(0)+k$(2)+k$(2)
1070 a$(3)=a$(3)+k$(2)+k$(2)+k$(0)
1080 a$(4)=k$(6)+k$(1)+k$(1)+k$(1)+k$(0)+k$(2)+k$(2)
1090 a$(4)=a$(4)+k$(2)+k$(2)+k$(2)
1100 a$(5)=k$(5)+k$(3)+k$(3)+k$(3)+k$(0)+k$(2)+k$(2)
1110 a$(5)=a$(5)+k$(2)+k$(2)+k$(0)
1120 a$(6)=k$(5)+k$(3)+k$(3)+k$(3)+k$(0)+k$(1)+k$(1)
1130 a$(6)=a$(6)+k$(1)+k$(1)+k$(0)
1140 a$(7)=k$(5)+k$(2)+k$(2)+k$(2)+k$(2)+k$(2)+k$(2)
1150 a$(7)=a$(7)+k$(2)+k$(2)+k$(2)
1160 a$(8)=k$(5)+k$(1)+k$(1)+k$(1)+k$(0)+k$(1)+k$(1)
1170 a$(8)=a$(8)+k$(1)+k$(1)+k$(0)
1180 a$(9)=k$(5)+k$(1)+k$(1)+k$(1)+k$(0)+k$(2)+k$(2)
1190 a$(9)=a$(9)+k$(2)+k$(2)+k$(2)
1200 a$(10)=k$(9)+k$(4)+k$(4)+k$(4)+k$(4)+k$(4)+k$(4)
1210 a$(10)=a$(10)+k$(4)+k$(4)+k$(4)
1230 return
2015 print"[147]";a$(1):print"";a$(0)
2017 forx=1to1000:next
2020 print"[147]";:fora=9to0step-1:print"";:printa$(a);
2030 next
2040 print"[147]"
2100 print" press q to quit."
2102 getr$:r=val(r$):ifr$="q"then63000
2107 x1$=left$(ti$,1):x2$=mid$(ti$,2,1):x3$=mid$(ti$,3,1)
2110 x4$=mid$(ti$,4,1):x5$=mid$(ti$,5,1):x6$=right$(ti$,1)
2120 x7$=x1$+x2$+x3$+x4$+x5$+x6$
2130 ifx7$=al$+"01"thengosub20000
2140 ifx1$="0"then2155
2150 print"";a$(val(x1$)):goto2160
2155 print"";a$(10)
2160 print"";a$(val(x2$))
2170 print"";x5$
2180 print"";x6$
2190 print"";a$(val(x3$))
2200 print"";a$(val(x4$))
2310 gosub30000
3285 ifr=0then2100
3290 onrgosub4000,5000,6000,7000,8000,9000,9500,9600,40000
3300 goto2100
4000 print"[147]":fors=1to10
4002 x5$=mid$(ti$,5,1):x6$=right$(ti$,1)
4003 gosub30000
4010 print"";a$(val(x5$))
4015 print"";a$(val(x6$))
4020 getx1$:ifx1$=" "then4002
4030 next:print"[147]":return
5000 print"[147]":g1$=g3$
5001 print"":g1$=g3$
5170 print"";g3$
5180 print" (p)m or (a)m ?";
5220 getg1$:ifg1$=""thengosub30000
5222 printg1$
5223 ifg1$="a"theng1$=am$:goto5230
5224 ifg1$="p"theng1$=pm$:goto5230
5225 g3$=g1$:goto5001
5230 print"[147]":return
6000 print"[147]";g1$
6010 fora=1to1000:next
6020 print"[147]":return
7000 s=54272
7010 forl=0to24:pokes+l,0:next
7030 pokes+14,5
7040 rempokes+18,16
7050 pokes+3,1
7060 pokes+24,143
7070 pokes+6,240
7080 pokes+4,65
7090 fr=5389
7100 getd$
7110 fq=fr+peek(s+27)*3.5
7120 hf=int(fq/256):lf=fq-hf*256
7130 pokes+0,lf:pokes+1,hf
7135 gosub30000
7140 ifd$=""then7100
7150 pokes+24,0:r=0:return
8000 print"[147]"
8010 input"alarm setting 0100-1259";al$
8015 ifval(al$)>1259orval(al$)<0100thenprint"[145][145]":goto8010
8017 iflen(al$)>4thenprint"[145][145]":goto8010
8020 input"pm or am";g2$
8022 ifg2$=pm$then8030
8024 ifg2$=am$then8030
8025 ifg2$="pm"theng2$=pm$:goto8030
8026 ifg2$="am"theng2$=am$:goto8030
8028 print"[145][145]":goto8020
8030 print"[147]";:return
9000 print"[147]"
9010 print"";a$(val(left$(al$,1)))
9020 print"";a$(val(mid$(al$,2,1)))
9030 print"";a$(val(mid$(al$,3,1)))
9040 print"";a$(val(right$(al$,1)))
9050 print"";g2$
9460 fora=1to200
9470 gosub30000
9480 next
9490 print"[147]":return
9500 print"hit 1-8 to change colors. (blk-yel)"
9505 gosub30000
9510 getrr$:ifval(rr$)<1orval(rr$)>8then9505
9515 print"[147] "
9520 poke53281,val(rr$)-1
9530 poke53280,val(rr$)-1:return
9600 print"hit 1-8 to change colors. (ora-grey3)"
9605 gosub30000
9610 getrr$:ifval(rr$)<1orval(rr$)>8then9605
9615 print"[147] "
9620 poke53281,val(rr$)+7
9630 poke53280,val(rr$)+7:return
20000 ifg1$><g2$thenreturn
20010 gosub7000
20100 return
30000 ifti$="120000"then30030
30001 ifti$=al$+"01"then20000
30003 ifval(left$(ti$,2))<13then30020
30005 zz=val(left$(ti$,2)):ifzz>12thenxx$=str$(zz-12)+right$(ti$,4)
30006 ifasc